import http from '@/utils/http'
/**
 * 首页-广告区域-小程序
 * @param {Number} distributionSite 1=首页 2=分类页面
 */
export const getHomeBanner = (distributionSite = 1) => {
    return http({
        url: "/home/banner",
        data: {
            distributionSite,
        },
    });
};

/**
* 首页-前台分类-小程序
*/
export const getHomeCategoryMutli = () => {
    return http({
        url: "/home/category/mutli",
    });
};

/**
* 首页-热门推荐-小程序
*/
export const getHomeHotMutli  = () => {
    return http({
        url: "/home/hot/mutli",
    });
};

/**
* 首页-新鲜好物-小程序
*/
export const getHomeNew = () => {
    return http({
        url: "/home/new",
    });
};

/**
* 猜你喜欢-小程序
*/
export const getHomeGoodsGuessLike  = (data) => {
    return http({
        url: "/home/goods/guessLike",
        data,
    });
};

/**
 * 根据 首页的人气推荐模块需求，来返回对应的数据
 * @param {String} url 请求的url
 * @param {Object} data 请求的数据
 */
export const getHomeRecommend = (url, data = {}) => {
    return http({
      url,
      data,
    });
  };